home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_345 / roses / roses.doc < prev    next >
Text File  |  1992-05-06  |  8KB  |  203 lines

  1.                                *************                               
  2.                                *   ROSES   *                                 
  3.                                *************
  4.                                  
  5.                                     by                                     
  6.                                Carmen Artino                               
  7.                                      &                                     
  8.                           The CDAUG Modula-2 SIG
  9.  
  10.     This program is copyrighted by the CDAUG Modula-2 sig but may be
  11. freely distributed. We hope that all who use it find it both enjoyable and
  12. useful. If you do please send a small donation ($5 or $10) to:
  13.  
  14.                           The DAUG House BBS Fund                          
  15.                 c/o The Captital District Amiga Users Group                
  16.                               P.O. Box 14353                               
  17.                              Albany, NY 12212                              
  18.  
  19.     Please feel free to give us a call. We are a totally Amiga BBS that
  20. runs the Atredes BBS software with Skypix protocol. We operate 24 hours a
  21. day at up to 2400 baud. We may be reached at
  22.  
  23.                               The DAUG House                               
  24.                               (518) 370-5207
  25.       
  26.  **************************************************************************
  27.  
  28.     This program is an enhanced version of the AmigaBasic program of
  29. the same name I wrote and that appeared in the April, 1989 issue of
  30. JumpDisk Magazine for the Amiga. This version was written using Benchmark
  31. Modula-2.
  32.  
  33.     This program draws sine roses and is an implementation of algorithm
  34. 2 given in the article, "A Rose is a Rose ..." by Peter M. Maurer, see the
  35. reference in the "About Roses" item in the Project menu.  Sine roses are
  36. graphs of the polar equation r = sin(n*d).
  37.  
  38.     To use the program simply double click its icon or type
  39.  
  40. run >nil: Roses
  41.  
  42. from the CLI. Make sure that Garnet font is in your current Fonts:
  43. directory before doing so. When the program starts, the "About Roses"
  44. screen will appear. After you've read the message, click the OK gadget.
  45.  
  46.     You can interact with the program in various ways using the three
  47. menus. Here are their respective descriptions.
  48.  
  49. Project
  50.   About Roses        -    The openning screen message
  51.   Show Authors        -    Very Important. Tells who we are!
  52.   Quit            -     Exit the program; no choice is given to
  53.                 continue.
  54.  
  55. Choices
  56.   Watch Evolution    -    This selection brings up a submenu allowing
  57.                 you to either use n = 2 (the default) or to
  58.                 change n to a different value via a
  59.                 requester. With this selection you can
  60.                 observe the Rose patterns for the various
  61.                 values of d; leave n set to 2 to start, you
  62.                 can change it later. This will give you a
  63.                 feel for what the program is doing.
  64.                 Selecting the second submenu item, "Change
  65.                 n" will bring up a requester. Enter a value
  66.                 for n (4 is nice) and enjoy the evolution
  67.                 in this case.
  68.  
  69.   Change n & d values    -     This choice brings up a requester with two
  70.                 string gadgets. The first is for the value
  71.                 of n and the second for the value of d.
  72.                 Keep in mind the following facts when make
  73.                 these changes. 1. d is measured in degrees,
  74.                 not radians. 2. Choose even integer values
  75.                 for n. Odd values will work but the curves
  76.                 tend to trace over themselves in these
  77.                 cases and produce a hesitation effect. In
  78.                 some instances, this can be used to produce
  79.                 interesting effects. Some suggested values
  80.                 for d and n follow these notes with my own
  81.                 comments; you'll probably come up with your
  82.                 own.
  83.  
  84.   Change Circle Subdivisions -  This will bring up yet another requester.
  85.                 Enter the value you want (see below for
  86.                 some suggestions) then hit RETURN. You will
  87.                 still have to make one of the other choices
  88.                 to see the effects of your change. Changing
  89.                 the circle subdivisions can in some cases
  90.                 produce some interesting results.  Changing
  91.                 to 359 degrees (from the default 360) is
  92.                 rather dramatic in many instances; see the
  93.                 comments below.
  94.  
  95. Type
  96.   Variation 1             -    This is the actual implementation of
  97.                 Maurer's algorithm.
  98.  
  99.   Variation 2             -     This is a modification of the algorithm my
  100.                 own design. Watch the evolution using both
  101.                 variations.
  102.  
  103.     The evolution takes place starting at d = 15 degrees and progresses
  104. in steps of 15 degrees up to 180 degrees. These parameters are visible on
  105. the screen in the upper right hand corner.
  106.  
  107.     Each time a Rose is drawn, several gadgets will appear along the
  108. right hand side of the screen. All are self-explanatory. Clicking on "Save
  109. Rose" will bring up a requester for a file name to save the Rose under. You
  110. should provide a full path name; otherwise, the rose will be save to the
  111. current directory. The screen is saved in compressed IFF format (including
  112. the parameters but without the gadgets) and the resulting picture may be
  113. manipulated with a paint program or an image processing program, etc. Some
  114. of the gadgets will be ghosted depending on what choice was made from the
  115. "Choices" menu. The "Save Rose" gadget, however, is never ghosted.
  116.  
  117.     For the nitty gritty mathematics of the whole show and for those
  118. with moderately strong hearts, I suggest reading Maurer's article. Enjoy!
  119.  
  120.     What follows are some possible selections for values of d and n
  121. that I found interesting. Even though variation 2 is not explicitly
  122. mentioned in all of them, try it anyway; you might enjoy those as well. In
  123. any event, explore to heart's content!
  124.  
  125. d = 59°, n = 60
  126.     Rotating equilateral triangle; rotates from bottom upwards to left;
  127. produces a circle
  128.  
  129. d = 44°, n = 44
  130.     Produces fat double leafed roses in succession.
  131.  
  132. d = 44°, n = 45
  133.     Produces roses using a centrally rotating "star of David"-like
  134. pattern.
  135.  
  136. d = 72°, n = 6
  137.     Very interesting pattern produced by a rotating pentatgram starting
  138. at the top and rotating clockwise. One of the patterns suggested by Maurer.
  139. Both variations are interesting though variation 2 does not produce the
  140. pentagram.
  141.  
  142. d = 91°, n = 92
  143.     Produces an 8 leafed rose using a rotating line segment. Starts at
  144. the top and rotates clockwise.  Variation 2 is also interesting - produces
  145. the 8 leaves "simultaneaously" using the rotating line segment.
  146.  
  147. d = 35°, n = 36
  148.     More interesting to watch. Produces the final pattern by rotating
  149. pentagrams of various sizes on their centers.
  150.  
  151. d = 78°, n = 121
  152.     Produces 3 "circles" by rotating a pattern three times in a
  153. clockwise fashion. Both the manner and the final pattern are interesting.
  154.  
  155. d = 120°, n = 4
  156.     Produces an 8 leafed roses using a rotating triangle in a manner
  157. similar to the rotating pentagram, d = 72, n = 6.  Very interesting.
  158. Variation 2 of the combination is also interesting.
  159.  
  160. d = 16°, n = 92
  161.     Produces a rose with 8 interleaved petals. Variation 2 of this
  162. combination produces the same rose, of course, but with an entirely
  163. different effect!
  164.  
  165. d = 28°, n = 206
  166.     Very interesting pattern that is difficult to describe.  Both
  167. variations are pleasant to watch and observe.
  168.  
  169. d = 16°, n = 94
  170.     Produces a beautiful 16 leafed rose; this final pattern is more
  171. interesting than the manner in which it is produced but watch variation 2
  172. anyway.
  173.  
  174. d = 180°
  175.     When n is an even number, the results obtained here are
  176. dramatically different than when is odd.  Try n = 6 then n = 7.
  177.  
  178.     In the following examples, the circle subdivisions should be set to
  179. 359°. Make this change from the Choices menu.
  180.  
  181. d = 90°, n = 181
  182.     Compare resulting pattern with that obtained when the circle
  183. subdivisions is set to 360°.  Better yet, for the same value of d choose n
  184. = 180 for z = 360° (get nothing) and for z = 359°.
  185.  
  186. d = 92°, n = 120
  187.     Again compare this with z = 360°.  Also compare with variation 2.
  188.  
  189. d = 50°, n = 216
  190.     Three loops with three inner loops.
  191.  
  192. d = 32°, n = 45
  193.     The pattern for z = 359° is dramatically different than the one for
  194. z = 360°.  For z = 359°, variation 2 is very interesting.
  195.  
  196. d = 90°, n = 91
  197.     Compare again to the pattern obtained when z = 360°.  Variation 2
  198. will given a different perspective on this pattern.
  199.  
  200. Carmen Artino
  201. P.O. Box 43
  202. Guilderland, NY 12084
  203.